package com.young.financial.controller;

import com.young.financial.service.FinancialBalancePayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * describe:
 *
 * @author zhaopengjun
 * @date 2019/9/2 8:19
 */
@RestController
@RequestMapping("/financialBalancePay")
public class FinancialBalancePayController {
    @Autowired
    private FinancialBalancePayService financialBalancePayService;

    /**
     * @Author zhaopengjun
     * @Description //微信余额支付
     * @Date 8:19 2019/9/2
     * @Param 
     * @return 
     **/
    @PostMapping("/balancePay")
    public Map<String,Object> balancePay(@RequestParam Map<String,Object> requestMap){
        return financialBalancePayService.balancePay(requestMap);
    }

    /**
     * @Author zhaopengjun
     * @Description //余额退款
     * @Date 8:47 2019/9/2
     * @Param 
     * @return 
     **/
    @PostMapping("/balanceRefund")
    public Map<String,Object> balanceRefund(@RequestParam Map<String,Object> requestMap){
        return financialBalancePayService.balanceRefund(requestMap);
    }
    
    /**
     * @Author zhaopengjun
     * @Description //余额代付
     * @Date 8:52 2019/9/2
     * @Param 
     * @return 
     **/
    @PostMapping("/balancePayment")
    public Boolean balancePayment(@RequestParam Map<String,Object> requestMap){
        return financialBalancePayService.balancePayment(requestMap);
    }

    /**
     * 主动查询余额支付
     * @param requestStr
     * @return
     */
    @PostMapping("/balancePayQuery")
    public Map<String,Object> balancePayQuery(@RequestParam String requestStr){
        return financialBalancePayService.balancePayQuery(requestStr);
    }
    /**
     * 主动查询余额代付
     */
    @PostMapping("/balancePaymentQuery")
    public Map<String,Object> balancePaymentQuery(@RequestParam Map<String,Object> requestMap){
        return financialBalancePayService.balancePaymentQuery(requestMap);
    }
}
